import Vue from 'vue'
import App from './App'
import {to,back,tar,redirec} from "utils/route/index.js"
import {preImg} from "utils/previewImage/index.js"
import {chooseImg} from "utils/chooseImg/index.js"


// http++baseUrl
import httpUrl from '@/common/http.url.js'
// http拦截器，将此部分放在new Vue()和app.$mount()之间，才能App.vue中正常使用
import httpInterceptor from '@/common/http.interceptor.js'
// http接口API抽离，免于写url或者一些固定的参数
import httpApi from '@/common/http.api.js'

import uView from "uview-ui";


Vue.config.productionTip = false
App.mpType = 'app'

Vue.config.silent = true

const app = new Vue({
	store,
	...App
})

// 引入uView提供的对vuex的简写法文件
let vuexStore = require('@/store/$u.mixin.js')
Vue.mixin(vuexStore)
// 引入vuex
import store from '@/store';



Vue.prototype.$to=to
Vue.prototype.$back=back
Vue.prototype.$tar=tar
Vue.prototype.$preImg=preImg
Vue.prototype.$chooseImg=chooseImg
Vue.prototype.$redirec=redirec

Vue.use(uView);
Vue.use(httpUrl, app)
Vue.use(httpInterceptor, app)
Vue.use(httpApi, app)





app.$mount()
